import axios from "../../axios"

// 用户登录
export function fetchPlateNums() {
    return axios.get('/fetchPlateNums')
}
export function getAutoPage() {
    return axios.get("/autoPageQuery")
}
export function driverPageQuery() {
    return axios.get("/driverPageQuery")
}
export function getAvailableDriverRole(){
    return axios.get("/getAvailableDriverRole")
}

export function getAutoStatusInfo(){
    return axios.get("/getAutoStatusInfo")
}

export function autoArchiveUpdate(data) {
    return axios({
        method: 'PUT',
        url: '/autoArchiveUpdate',
        data: data
    })
}
export function driverArchiveUpdate(data) {
    return axios({
        method: 'PUT',
        url: '/driverArchiveUpdate',
        data: data
    })
}
export function autoArchiveInsert(data) {
    return axios({
        method: 'POST',
        url: '/autoArchiveInsert',
        data: data
    })
}

export function driverArchiveInsert(data) {
    return axios({
        method: 'POST',
        url: '/driverArchiveInsert',
        data: data
    })
}

export function autoArchiveDelete(autoId) {
    return axios.delete('/autoArchDelete?autoId=' + autoId)
}

export function driverArchiveDelete(userId) {
    return axios.delete('/driverArchiveDelete?userId=' + userId)
}

export function getDriverList() {
    return axios({
        method: 'GET',
        url: '/getDriverList'
    })
}

export function getDriverNameById(driverId) {
    return axios.get('/getDriverNameById?driverId=' + driverId)
}

